package com.xz.log.log4j2.sample;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

/**
 * Created by fingal on 2018/7/18.
 */
public class Log4j2Sample {
    private static final Logger logger = LogManager.getLogger(Log4j2Sample.class);

    private static final Log4j2Sample INSTANCE = new Log4j2Sample();

    private Log4j2Sample() {}

    public static Log4j2Sample getInstance() {
        return INSTANCE;
    }

    public void log() {
        logger.trace("this is a trace log...log4j2");

        logger.debug("this is a debug log...log4j2");

        logger.info("this is a info log...log4j2");

        logger.warn("this is a warn log...log4j2");

        logger.error("this is a error log...log4j2");
    }
}
